package com.aiit.service.impl;

import com.aiit.dao.IPurchaseOrderDao;
import com.aiit.pojo.NameValue;
import com.aiit.pojo.order.PurchaseOrder;
import com.aiit.service.IPurchaseOrderService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PurchaseOrderServiceImpl extends ServiceImpl<IPurchaseOrderDao, PurchaseOrder> implements IPurchaseOrderService {
    @Autowired
    IPurchaseOrderDao purchaseOrderDao;

    @Override
    public Integer insert(PurchaseOrder purchaseOrder) {
        return purchaseOrderDao.insert(purchaseOrder);
    }

    @Override
    public List<PurchaseOrder> queryAll() {
        return purchaseOrderDao.selectList1();
    }
    @Override
    public List<PurchaseOrder> queryAll2() {
        return purchaseOrderDao.selectList2();
    }
    @Override
    public List<PurchaseOrder> queryAll3() {
        return purchaseOrderDao.selectList3();
    }
    @Override
    public List<PurchaseOrder> queryAll4() {
        return purchaseOrderDao.selectList4();
    }
    @Override
    public List<PurchaseOrder> queryAll5() {
        return purchaseOrderDao.selectList5();
    }
    @Override
    public List<PurchaseOrder> queryAll6() {
        return purchaseOrderDao.selectList6();
    }

    @Override
    public PurchaseOrder queryById(Integer id) {
        return purchaseOrderDao.selectById(id);
    }

    @Override
    public List<PurchaseOrder> queryByLMId(Integer lingjianId,Integer merchantId) {
        return purchaseOrderDao.selectByLMId(lingjianId,merchantId);
    }
    @Override
    public List<PurchaseOrder> queryByLMId2(Integer lingjianId, Integer merchantId) {
        return purchaseOrderDao.selectByLMId2(lingjianId,merchantId);
    }

    @Override
    public PurchaseOrder queryById2(Integer parseInt) {
        return purchaseOrderDao.selectById2(parseInt);
    }
    @Override
    public PurchaseOrder queryById3(Integer id) {
        return purchaseOrderDao.selectById3(id);
    }
    @Override
    public PurchaseOrder queryById4(Integer id) {
        return purchaseOrderDao.selectById4(id);
    }
    @Override
    public PurchaseOrder queryById5(Integer id) {
        return purchaseOrderDao.selectById5(id);
    }

    @Override
    public List<PurchaseOrder> queryByLId(Integer id) {
        return purchaseOrderDao.selectByLId(id);
    }
    @Override
    public List<PurchaseOrder> queryByLId2(Integer id) {
        return purchaseOrderDao.selectByLId2(id);
    }
    @Override
    public List<PurchaseOrder> queryByLId3(Integer lingjianId) {
        return purchaseOrderDao.selectByLId3(lingjianId);
    }

    @Override
    public List<PurchaseOrder> queryByMId(Integer id) {
        return purchaseOrderDao.selectByMId(id);
    }
    @Override
    public List<PurchaseOrder> queryByMId2(Integer id) {
        return purchaseOrderDao.selectByMId2(id);
    }

    @Override
    public Integer deleteById(Integer id) {
        return purchaseOrderDao.deleteById(id);
    }
    @Override
    public Integer updateById2(Integer id) {
        return purchaseOrderDao.updateById2(id);
    }
    @Override
    public boolean updateById3(PurchaseOrder purchaseOrder) {
        return purchaseOrderDao.updateById3(purchaseOrder);
    }

    @Override
    public PurchaseOrder queryByUId(Integer id, Integer userId) {
        return purchaseOrderDao.selectByUId(id,userId);
    }
    @Override
    public List<PurchaseOrder> queryByUId2(Integer userId) {
        return purchaseOrderDao.selectByUid2(userId);
    }

    @Override
    public List<PurchaseOrder> queryByLUId(Integer lingjianId, Integer userId) {
        return purchaseOrderDao.selectByLUId(lingjianId,userId);
    }

    @Override
    public List<NameValue> queryAllSun() {
        return purchaseOrderDao.queryAllSum();
    }

    @Override
    public Integer queryPOSByMLId(Integer merchantId, Integer lingjianId) {
        return purchaseOrderDao.queryPOSByMLId(merchantId,lingjianId);
    }

    @Override
    public Integer queryPOSByMLId2(Integer merchantId, Integer lingjianId) {
        return purchaseOrderDao.queryPOSByMLId2(merchantId,lingjianId);
    }

}
